summaryrefslogtreecommitdiff
path: root/app/[lng]/evcp/(evcp)/bid/[id]/page.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'app/[lng]/evcp/(evcp)/bid/[id]/page.tsx')
-rw-r--r--app/[lng]/evcp/(evcp)/bid/[id]/page.tsx52
1 files changed, 6 insertions, 46 deletions
diff --git a/app/[lng]/evcp/(evcp)/bid/[id]/page.tsx b/app/[lng]/evcp/(evcp)/bid/[id]/page.tsx
index e4051f9b..ca0788a5 100644
--- a/app/[lng]/evcp/(evcp)/bid/[id]/page.tsx
+++ b/app/[lng]/evcp/(evcp)/bid/[id]/page.tsx
@@ -1,52 +1,12 @@
-import { Suspense } from 'react'
-import { notFound } from 'next/navigation'
-import { getBiddingDetailData } from '@/lib/bidding/detail/service'
-import { BiddingDetailContent } from '@/lib/bidding/detail/table/bidding-detail-content'
-
-// 메타데이터 생성
-export async function generateMetadata({ params }: { params: Promise<{ id: string }> }) {
- const { id } = await params
- const parsedId = parseInt(id)
- if (isNaN(parsedId)) return { title: '입찰 상세' }
-
- try {
- const detailData = await getBiddingDetailData(parsedId)
- return {
- title: detailData.bidding ? `${detailData.bidding.title} - 입찰 상세` : '입찰 상세',
- }
- } catch {
- return { title: '입찰 상세' }
- }
-}
+import { redirect } from 'next/navigation'
interface PageProps {
- params: Promise<{ id: string }>
+ params: Promise<{ lng: string; id: string }>
}
export default async function Page({ params }: PageProps) {
- const { id } = await params
- const parsedId = parseInt(id)
-
- if (isNaN(parsedId)) {
- notFound()
- }
-
- // 통합 데이터 로딩 함수 사용
- const detailData = await getBiddingDetailData(parsedId)
-
- if (!detailData.bidding) {
- notFound()
- }
-
- return (
- <Suspense fallback={<div className="p-8">로딩 중...</div>}>
- <BiddingDetailContent
- bidding={detailData.bidding}
- quotationDetails={detailData.quotationDetails}
- quotationVendors={detailData.quotationVendors}
- biddingCompanies={detailData.biddingCompanies}
- prItems={detailData.prItems}
- />
- </Suspense>
- )
+ const { lng, id } = await params
+
+ // 기본적으로 입찰 사전견적 페이지로 리다이렉트
+ redirect(`/${lng}/evcp/bid/${id}/pre-quote`)
}